package com.douqu.game.core.e;

/**
 * @Author: Bean
 * @Description:
 * @Date: 2018-10-12 17:50
 */
public enum E_ValueType implements BaseEnum {

    DEFAULT(1, "默认值"),
    RATIO_10000(2, "万分比")
    ;

    int code;

    String msg;

    E_ValueType(int code, String msg)
    {
        this.code = code;
        this.msg = msg;
    }


    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public static E_ValueType forNumber(int value)
    {
        for(E_ValueType item : values())
        {
            if(item.getCode() == value)
                return item;
        }
        return DEFAULT;
    }

}
